-- GENERATED SPELL FOR [Wrekt Warrior] --


function spell0_17142(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(11976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17142', 562, 1)
end

function spell1_17142(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_17142', 559, 1)
end

function spell2_17142(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(17207,pUnit)
pUnit:RegisterEvent('Sorts_17142', 2000, 1)
end

function Sorts_17142(pUnit, Event)
local choix_sorts_17142 = math.random(0, 2)
if choix_sorts_17142 == 0 then
pUnit:RegisterEvent('spell0_17142', 1, 1)
end
if choix_sorts_17142 == 1 then
pUnit:RegisterEvent('spell1_17142', 1, 1)
end
if choix_sorts_17142 == 2 then
pUnit:RegisterEvent('spell2_17142', 1, 1)
end
end

function mob17142_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17142', math.random(1500, 3000), 1)
end

function mob17142_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17142_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17142_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17142, 1, 'mob17142_Action')
RegisterUnitEvent(17142, 2, 'mob17142_Leave')
RegisterUnitEvent(17142, 3, 'mob17142_Kill')
RegisterUnitEvent(17142, 4, 'mob17142_Die')
